package com.kuaimacode.kframework.exception;

import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.Getter;

@Getter
@AllArgsConstructor
@EqualsAndHashCode(callSuper=false)
public class ServerInternalErrorException extends RuntimeException {

    private String code;
    private String message;

    public ServerInternalErrorException(String message, Throwable cause) {
        super(message, cause);
    }

    public ServerInternalErrorException(String message) {
        super(message);
    }

    public ServerInternalErrorException(ErrorEnum errorEnum) {
        this.code = errorEnum.getCode();
        this.message = errorEnum.getMsg();
    }
}
